package com.handler;

import com.ymx.darling.bean.sql.SqlStatement;
import com.ymx.darling.build.mapper.MapperMethodInfoInfoManager;
import com.ymx.darling.build.mapper.method.ProviderMethodInfo;
import com.ymx.darling.session.Session;
import com.ymx.darling.wrapper.QueryWrapper;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author 爱Java的小于
 */
public class SelectListAs extends ProviderMethodInfo {
    @Override
    public Object invoke(Class<?> mapperClass, Session session, String sqlStatementId, Object[] param) throws Throwable {
        Class<?> resulType = (Class<?>)param[0];
        String sql = (String)param[1];
        Object[] params = (Object[])param[2];

        sql = sql + " limit 0, 5";

        return session.selectList(resulType, sql, params);
    }
}
